home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC & Mediji 1997 October
/
PCM_9710.iso
/
programi
/
cakewalk
/
ad.1
/
Thin Channel Aftertouch.cal
< prev
next >
Wrap
Text File
|
1997-05-15
|
820b
|
42 lines
;; Thin Channel Aftertouch.cal
;;
;; A CAL program to "thin" channel aftertouch data.
;;
;; Deletes every N'th channel aftertouch event unless the pressure value is
;; is 0, 64, or 127.
;;
;;
(do
(include "need20.cal") ; Require version 2.0 or higher of CAL
(int N 4) ; thin every N'th event
(int i 0) ; index for moving through
(getInt N "Delete every Nth ChanAft event:" 1 100)
(forEachEvent
(do
(if (== Event.Kind CHANAFT)
(do
(switch ChanAft.Val
;; Don't delete if value is 0, 64, or 127....
0
NIL
64
NIL
127
NIL
ChanAft.Val ; Default -- anything else...
(if (== 0 (% i N)) ; is it the N'th event?
(delete)
)
)
(++ i) ; this counts
)
)
)
)
)